﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevFx.FrameWork.Log;
using Castle.DynamicProxy;
using DevFx.FrameWork.Trans;

namespace DevFx.FrameWork.Core
{
    public class InterceptorProxy : IInterceptor
    {
        #region 变量
        private LogHelper logHelper = new LogHelper();
        private TransactionHelper trans = new TransactionHelper();
        #endregion

        #region 公共方法

        #endregion
        public void Intercept(IInvocation invocation)
        {
            logHelper.WritePreLog(invocation);
            trans.ExcuteWithTrans(invocation);
            logHelper.WriteAfterLog(invocation);
        }

    }
}
